<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>优田儿童成长中心</title>
    <link href="/static/assets/fontAwesome/css/fontawesome-all.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/themify-icons.css" rel="stylesheet">
    <link href="/static/assets/css/lib/mmc-chat.css" rel="stylesheet"/>
    <link href="/static/assets/css/lib/sidebar.css" rel="stylesheet">
    <link href="/static/assets/css/lib/bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/nixon.css" rel="stylesheet">
    <link href="/static/assets/lib/lobipanel/css/lobipanel.min.css" rel="stylesheet">
    <link href="/static/assets/css/style.css" rel="stylesheet">
</head>

<body>
<div class="sidebar sidebar-hide-to-small sidebar-shrink sidebar-gestures">
    <div class="nano">
        <div class="nano-content">
            <ul>
                <li>
                    <a href="/home/"><i class="ti-bar-chart"></i> 统计数据</a>
                </li>
                <li class="active">
                    <a href="/teacher/"><i class="ti-user"></i> 教师管理<span
                            class="sidebar-collapse-icon ti-angle-right"></span></a>
                </li>
                <li>
                    <a href="/child/"><i class="ti-user"></i> 幼儿管理</a>
                </li>
                <li>
                    <a href="/posts/"><i class="ti-desktop"></i> 岗位管理</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="header">
    <div class="pull-left">
        <div class="logo">
            <a>
                <img id="logoImg" src="/static/img/yt1.png" data-logo_big="/static/img/yt1.png"
                     data-logo_small="/static/img/yt3.png" alt="Nixon"/>
            </a>
        </div>
        <div class="hamburger sidebar-toggle">
            <span class="ti-menu"></span>
        </div>
    </div>
    <div class="pull-right p-r-15">
        <ul>
            <li class="header-icon dib">
                <img class="avatar-img" src="/static/assets/images/avatar/1.jpg" alt=""/> <span
                    class="user-avatar"><span th:text="${session.username}"></span>&nbsp;&nbsp;&nbsp;<i
                    class="ti-angle-down f-s-10"></i></span>
                <div class="drop-down dropdown-profile">
                    <div class="dropdown-content-body">
                        <ul>
                            <li><a href="/exit/"><i class="ti-power-off"></i> <span>注销</span></a></li>
                        </ul>
                    </div>
                </div>
            </li>
        </ul>
    </div>
</div>
<div class="content-wrap">
    <div class="main">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-8 p-0">
                    <div class="page-header">
                        <div class="page-title">
                            <h1>
                                <span class="ti-calendar"></span>
                                <span th:text="${gsal.month}"></span> 教师工资详情
                            </h1>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 p-0">
                    <div class="page-header">
                        <div class="page-title">
                            <ol class="breadcrumb text-right">
                                <a href="javascript:;" class="btn-link" style="font-size: 16px;" id="back">
                                    <span class="glyphicon glyphicon-triangle-left" aria-hidden="true"></span>返回
                                </a>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main-content">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="card alert">
                            <div class="card-header">
                                <input type="hidden" id="ttype" th:value="${t.ttype}" />
                                <h4>
                                    <span class="ti-receipt"></span> 基本工资
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(20,160,255,0.19)">
                                        <th>底薪</th>
                                        <th>社保补助</th>
                                        <th>学历补助</th>
                                        <th>全勤</th>
                                        <th>话补</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td th:text="${gsal.base_sal}">0</td>
                                        <td th:text="${gsal.subsidy}">0</td>
                                        <td th:text="${gsal.edu}">0</td>
                                        <td th:text="${gsal.full_time}">0</td>
                                        <td th:text="${gsal.phone}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="6" align="right"
                                            th:text="${gsal.base_sal + gsal.subsidy + gsal.edu + gsal.full_time + gsal.phone}">
                                            ￥0
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 奖金提成
                                </h4>
                                <div class="card-header-right-icon">

                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: #f2dede;color: #a94442">
                                        <th>卫生奖</th>
                                        <th>安全将</th>
                                        <th>教育教学</th>
                                        <th>家长服务</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td th:text="${gsal.health}">0</td>
                                        <td th:text="${gsal.safe}">0</td>
                                        <td th:text="${gsal.class_hour}">0</td>
                                        <td th:text="${gsal.parent}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right" id="bonusTotal">￥0</td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 延点班课时费
                                </h4>
                                <div class="card-header-right-icon">

                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(255,187,68,0.19)">
                                        <th>课时数</th>
                                        <th>单价</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td th:text="${gsal.num}">0</td>
                                        <td id="unitPrice">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="5" align="right">
                                            ￥<span id="result">0</span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 岗位工资
                                </h4>
                                <div class="card-header-right-icon">

                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(255,81,22,0.19)">
                                        <th>岗位价格</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td th:text="${gsal.post_sal}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right">
                                            ￥<span id="postsal" th:text="${gsal.post_sal}">0</span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 工龄工资
                                </h4>
                                <div class="card-header-right-icon">

                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(255,81,22,0.19)">
                                        <th>工龄价格</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td th:text="${gsal.year}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right">
                                            ￥<span id="yearsal" th:text="${gsal.year}">0</span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 业绩提成
                                </h4>
                                <div class="card-header-right-icon">

                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(81,255,55,0.19)">
                                        <th>业绩奖金</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td th:text="${gsal.comm}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right">
                                            ￥<span id="comm" th:text="${gsal.comm}">0</span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-12">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-layout-media-overlay"></span> 合计
                                </h4>
                                <div class="card-header-right-icon">

                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <tfoot>
                                    <tr>
                                        <td class="color-danger" align="right"><strong>
                                            ￥<span id="total">0</span>
                                        </strong></td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            Copyright &copy; 2024
        </div>
    </div>
</div>
<script src="/static/assets/js/lib/jquery.min.js"></script>
<script src="/static/assets/js/lib/jquery.nanoscroller.min.js"></script>
<script src="/static/assets/js/lib/sidebar.js"></script>
<script src="/static/assets/js/lib/bootstrap.min.js"></script>
<script src="/static/assets/js/lib/mmc-common.js"></script>
<script src="/static/assets/js/lib/mmc-chat.js"></script>
<script src="/static/assets/js/lib/chart-js/Chart.bundle.js"></script>
<script src="/static/assets/js/lib/chart-js/chartjs-init.js"></script>
<script src="/static/assets/js/lib/datamap/d3.min.js"></script>
<script src="/static/assets/js/lib/datamap/topojson.js"></script>
<script src="/static/assets/js/lib/datamap/datamaps.world.min.js"></script>
<script src="/static/assets/js/lib/datamap/datamap-init.js"></script>
<script src="/static/assets/lib/lobipanel/js/lobipanel.js"></script>
<script src="/static/assets/js/scripts.js"></script>
<script th:inline="javascript">
    $(document).ready(function () {
        $('#lobipanel-custom-control').lobiPanel({
            reload: false,
            close: false,
            editTitle: false
        });
        $('#back').click(function () {
            history.back();
        });
    });

    var base_sal = /*[[${gsal.base_sal}]]*/ 0;
    var subsidy = /*[[${gsal.subsidy}]]*/ 0;
    var edu = /*[[${gsal.edu}]]*/ 0;
    var full_time = /*[[${gsal.full_time}]]*/ 0;
    var phone = /*[[${gsal.phone}]]*/ 0;

    var health = /*[[${gsal.health}]]*/ 0;
    var safe = /*[[${gsal.safe}]]*/ 0;
    var class_hour = /*[[${gsal.class_hour}]]*/ 0;
    var parent = /*[[${gsal.parent}]]*/ 0;

    var post_sal = /*[[${gsal.post_sal}]]*/ 0;
    var year = /*[[${gsal.year}]]*/ 0;
    var comm = /*[[${gsal.comm}]]*/ 0;

    var num = /*[[${gsal.num}]]*/ 0;

    var unitPrice = 0;
    if(num < 110){
        unitPrice = 6;
    } else if(num < 150){
        unitPrice = 7;
    } else if(num < 190){
        unitPrice = 8;
    } else if(num < 240){
        unitPrice = 9;
    } else {
        unitPrice = 12;
    }

    document.getElementById('unitPrice').textContent = unitPrice;

    var overtimePay = num * unitPrice;
    document.getElementById('result').textContent = overtimePay.toFixed(2);

    var bonusTotal = health + safe + class_hour + parent;
    document.getElementById('bonusTotal').textContent = '￥' + bonusTotal.toFixed(2);

    var total = base_sal + subsidy + edu + full_time + phone + bonusTotal + post_sal + year + comm + overtimePay;
    document.getElementById('total').textContent = total.toFixed(2);
</script>
<style>
    .copyrights {
        text-indent: -9999px;
        height: 0;
        line-height: 0;
        font-size: 0;
        overflow: hidden;
    }
</style>
<div class="copyrights">
    <h3>&copy; 版权所有 | </h3>
</div>
</body>
</html>